# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kimageformats
pkgver=5.72.0
pkgrel=0
pkgdesc="Image format plugins for Qt5"
arch="all !armhf !mips64" # armhf blocked by extra-cmake-modules, mips64 blocked by openexr
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
makedepends="qt5-qtbase-dev karchive-dev extra-cmake-modules openexr-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kimageformats-$pkgver.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="61a46f76c51fe4d3fa8c831beb7d1026f54f40a12ed342141c5315cbc773ba7740b09769672bc54ff6e03ac7a4ebdfc7c69bfe5ef7359b844fb0e88d1399488d  kimageformats-5.72.0.tar.xz"
